﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            string query = "Insert into UserDetails(UserName,Password,FirstName,LastName,Email,DOB,isActive) values('" + txt_name.Text + "','" + txt_pass.Text + "','" + txt_fname.Text + "','" + txt_lname.Text + "','" + txt_email.Text + "','" + txt_db.Text + "','" +true + "')";
            ConnectionManager.ExecuteQueries(query);

            ScriptManager.RegisterStartupScript(this, this.GetType(), "alertmessage", "javascript:alert(' Data Store Sussessfully ')", true);

            refresh();
        }

        catch(Exception ex)
        {

        }

       
    }

    public void refresh()
    {
        txt_db.Text = "";
        txt_email.Text = "";
        txt_fname.Text = "";
        txt_lname.Text = "";
        txt_name.Text = "";
    }
}